<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>
<body>
  <script>
    var r = prompt('请输入圆的半径：');
    r = parseFloat(r);
    var c = 2 * 3.14 * r; 
    var s = 3.14 * r * r;
    // 在控制台输出圆的周长和面积
    console.log('圆的周长为：' + c.toFixed(2));
    console.log('圆的面积为：' + s.toFixed(2));
  </script>
</body>
</html>